home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utilsys / rss14gmd.lha / RSys_1.4gmd / Inc / RSysPre.h < prev   
C/C++ Source or Header  |  1996-05-04  |  8KB  |  323 lines

  1.  
  2. /*
  3.  ***************************************************************************
  4.  *
  5.  * Datei:
  6.  *    RSysPre.h
  7.  *
  8.  * Inhalt:
  9.  *
  10.  *      --- Globale Routinen ---
  11.  *
  12.  *
  13.  *      --- Lokale  Routinen ---
  14.  *
  15.  *
  16.  * Bemerkungen:
  17.  *    Dise Datei wird vorkompiliert (Zeitgewinn beim Übersetzen
  18.  *    einzelner Module.
  19.  *
  20.  * Erstellungsdatum:
  21.  *    19-Jul-93    Rolf Böhme
  22.  *
  23.  * Änderungen:
  24.  *    19-Jul-93    Rolf Böhme    Erstellung
  25.  *
  26.  ***************************************************************************
  27.  */
  28.  
  29.  
  30. extern struct DosLibrary*DOSBase;
  31. extern struct ExecBase*SysBase;/*GMD*/
  32.  
  33. #define WIN_LOCK TRUE  
  34. #define WIN_UNLOCK FALSE  
  35.  
  36. #define NAME  "RSYS"
  37. #define DATE  __DATE__
  38. #define TIME  __TIME__
  39. #define COPYRIGHT "(c) by Rolf Boehme (GiftWare and PD)"
  40.  
  41. #define UNSETLVPOS    -1
  42. #define NO_CASE     0
  43. #define CASE      1
  44. #define HOTKEYS     7
  45. #define MAXSHOW     10
  46. #define SYSTEMINFO    12
  47. #define TITLELEN    65
  48. #define PWDLEN      20
  49. #define ENVLEN      20
  50. #define PARTSIZE    20
  51. #define MAXSTRLEN     30
  52. #define BUFSIZE                  60
  53. #define PATTERNLEN    50
  54. #define SEC      50
  55. #define HELPLINESIZE     50
  56. #define PATHPARTWIDTH    80
  57. #define PARSEPATLEN    102
  58. #define MAXFULLNAME    108
  59. #define MAXLINESIZE    150
  60. #define MAXWRITESIZE     200
  61. #define CRCTABSIZE    256
  62. #define MAXLARGEMEM    512
  63. #define FRAC      8192
  64. #define FULL      65536
  65.  
  66. #define CRC16                 0
  67. #define CRC32                 1
  68.  
  69. /*
  70.  * Window-Gadgets-Counter
  71.  */
  72. #define ChgPri_CNT            5
  73. #define ShowFont_TNUM         1
  74. #define CRC_CNT               5
  75. #define Crypt_CNT             8
  76. #define Formatter_CNT         8
  77. #define FindFile_CNT          10
  78. #define FormatDisk_CNT        10
  79. #define SaveAWindow_CNT       3
  80. #define MemMonitor_CNT        13
  81. #define SearchStr_CNT         3
  82. #define Sys_CNT               19
  83.  
  84. #define NOSCREENTITLECHANGE ((UBYTE*)(-1))
  85.  
  86. #define R13       TRUE
  87. #define CRY       FALSE
  88.  
  89. #define ESC       '\33'
  90.  
  91. #define ACTION_TOKEN    "#"
  92.  
  93. #define COUNT_FLAGS    (GD_HandlerInpGad+1)
  94. #define KEY_RELEASE    0x80
  95. #define KEY_HELP     0x5F
  96. #define KEY_q      0x10
  97. #define KEY_ESC     0x45
  98.  
  99. #define custom      (*(struct Custom *)0xDFF000)
  100.  
  101. #define EVT_HOTKEY    1L
  102.  
  103. #define CNTMASK     LDF_DEVICES
  104. #define MASK      (CNTMASK|LDF_READ)
  105. #define B2C(x)      ((VOID*)(((LONG)(x))<<2))
  106.  
  107. #define ID_PORT_NAME    (UBYTE*)"RSys.rendezvous"
  108.  
  109. #define STRINGEND     '\0'
  110.  
  111. #define KILL      TRUE
  112. #define NO_KILL     FALSE
  113.  
  114. #define YES       TRUE
  115. #define NO       FALSE
  116.  
  117. #define SORT      TRUE
  118. #define NO_SORT     FALSE
  119.  
  120. #define SPEAK      TRUE
  121. #define NO_SPEAK     FALSE
  122.  
  123. #define ErrorHandle(str,nr1,nr2,kill) ErrorHandleFull(str,nr1,nr2,kill,__FILE__,__FUNC__,__LINE__)
  124.  
  125. #define CTRLKEYS (AMIGAKEYS | IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT | \
  126. IEQUALIFIER_CAPSLOCK | IEQUALIFIER_CONTROL | IEQUALIFIER_LALT | IEQUALIFIER_RALT |\
  127. IEQUALIFIER_NUMERICPAD)
  128.  
  129. /*
  130.  * Dieses Template wird von der Funktion ReadArgs()
  131.  * verwendet, um die Argumente auf der Kommandozeile
  132.  * zu parsen. Es erscheint auch, wenn man das
  133.  * Programm RSys mit dem Parameter "?" aufruft
  134.  * Aus RSys.c
  135.  */
  136. #define TEMPLATE \
  137. (UBYTE*)"T=TASKS/S,L=LIBRARIES/S,M=MEMORY/S,P=PORTS/S,V=VOLUMES/S,\
  138. A=ASSIGNS/S,F=FONTS/S,R=RESOURCES/S,I=INTERRUPTS/S,W=WINDOWS/S,\
  139. S=SCREENS/S,H=INPUTHDL/S"
  140.  
  141. #define CTRL_C_RECEIVED          (mask & SIGBREAKF_CTRL_C)
  142. #define ID_PORT_SIG_RECEIVED     (mask & (1L << SysIdPort->mp_SigBit))
  143. #define BROKER_PORT_SIG_RECEIVED (mask & (1L << broker_mp->mp_SigBit))
  144. #define WINDOW_PORT_SIG_RECEIVED (mask & (1L << SysWnd->UserPort->mp_SigBit))
  145.  
  146. #define ESC_PRESSED        ((class == IDCMP_VANILLAKEY) && (code==ESC))
  147. #define MENU_PRESSED       ((class == IDCMP_MENUPICK  ) && (MENUNUM(code) == 0) && (ITEMNUM(code) == 0))
  148.  
  149. #define ICONIFY_REQUESTED  (Flags.wb_start && (ESC_PRESSED || MENU_PRESSED))
  150.  
  151. /*
  152.  * Aus RSysTreeHunks.c
  153.  */
  154. #define RKEY ((struct Remember**)&dekey)
  155. #define SIZEDE sizeof(struct diskhunkentry)
  156.  
  157. #define IS_SET(pos) (mask&(1L<<(pos)))
  158. #define SET(pos)  (mask|=(1L<<(pos)))
  159. #define UNSET(pos) (mask&=(~(1L<<(pos))))
  160.  
  161. #define IDIR   "\303"
  162. #define ILASTDIR  "\300"
  163. #define ISUBDIR  "\304 "
  164. #define ILEVEL   "\263  "
  165.  
  166. #define ADIR   "+"
  167. #define ALASTDIR  "\\"
  168. #define ASUBDIR  "- "
  169. #define ALEVEL   "|  "
  170.  
  171. /*
  172.  * Aus RSysCRC.c
  173.  */
  174. /*
  175.  * The width of the cell ring is defined here. A word of warning: never
  176.  * encrypt a file and forget the access password, since it will be
  177.  * extremely hard to break the code (with 30 cells there are 256^30
  178.  * possible values each cell may be initialized to which means that
  179.  * you could have to try more than 1.7e+72 combinations for each single
  180.  * password character before actually finding the matching password).
  181.  * See `Random sequence generation by cellular automata' by Steven
  182.  * Wolfram (Institute for Advanced Study; Advances in Applied
  183.  * Mathematics) for more information.
  184.  */
  185.  
  186. #define CELL_WIDTH 30
  187.  
  188. /*
  189.  * Aus RSysClip.c
  190.  */
  191. #define ID_FTXT  MAKE_ID('F','T','X','T')
  192. #define ID_CHRS  MAKE_ID('C','H','R','S')
  193.  
  194. /*
  195.  * Aus RSysCheckOffsets.c
  196.  */
  197. #define FKEY    ((struct Remember**)&FKey)
  198. #define ALLOCF(size)  AllocRemember(FKEY,(size),MEMF_CLEAR)
  199. #define FREEF(flag)  FreeRemember(FKEY,(flag))
  200.  
  201. #define MAGIC_ROM_END ((ULONG)0x01000000)
  202. #define MAGIC_ROM_SIZE ((ULONG)(*((ULONG *)0x00FFFFEC)))
  203.  
  204. #define FUNCOFFS sizeof(struct func)
  205.  
  206. #define LIBCNT   sizeof(libs)/sizeof(struct _liblist)
  207. #define DEVCNT   sizeof(devs)/sizeof(struct _devlist)
  208.  
  209. /*
  210.  * Aus RSysFormatFind.c
  211.  */
  212. #define DF 0
  213. #define FI 1
  214. #define DI 2
  215.  
  216. #define DEVKEY  ((struct Remember**)&DevKey)
  217. #define FILEKEY ((struct Remember**)&FileKey)
  218.  
  219. #define CMDFMT "%s DRIVE %s NAME \"%s\" %s %s %s %s"
  220.  
  221. /*
  222.  * Aus RSysSpecialList.c
  223.  */
  224. #define MAX_BROKER_ENTRIES 40
  225.  
  226. /*
  227.  * Aus RSysSignalTrap.c
  228.  */
  229. #define _NUMSIG    15
  230. #define _FSTSIG    0
  231.  
  232. /*
  233.  * Aus RSysHunks.c
  234.  */
  235. #define ERKEY ((struct Remember**)&hekey)
  236. #define ESIZEDE sizeof(struct hunkentry)
  237.  
  238. /*
  239.  * Aus RSysSaveWindow.c
  240.  */
  241.  
  242. /* Current compression mode. */
  243.  
  244. #define DUMP  0
  245. #define RUN  1
  246.  
  247. /* ByteRun compression data. */
  248.  
  249. #define MINRUN  3
  250. #define MAXRUN  128
  251. #define MAXDAT  128
  252.  
  253. /* Chunk types. */
  254.  
  255. #define ID_ILBM  MAKE_ID('I','L','B','M')
  256. #define ID_ANNO  MAKE_ID('A','N','N','O')
  257. #define ID_BMHD  MAKE_ID('B','M','H','D')
  258. #define ID_CMAP  MAKE_ID('C','M','A','P')
  259. #define ID_CAMG  MAKE_ID('C','A','M','G')
  260. #define ID_BODY  MAKE_ID('B','O','D','Y')
  261.  
  262. /* Masking technique. */
  263.  
  264. #define mskNone  0
  265.  
  266. /* Compression techniques. */
  267.  
  268. #define cmpNone  0
  269. #define cmpByteRun1 1
  270.  
  271. /*
  272.  * Aus RSysSummaryLists.c
  273.  */
  274. #define MEMTYPELEN 15
  275. #define NONE (WORD)(0xFFFF)
  276.  
  277. #define CNT_DEVELOPER (sizeof(manu)/sizeof(struct Manufacturer))
  278.  
  279. #define GFXF_AA_ALICE 4
  280. #define GFXF_AA_LISA  8
  281. #define GFXF_AA_MLISA 16/* internal use only */
  282.  
  283. /*
  284.  * Aus RSysGfxIntuiLists.c
  285.  */
  286. #define SETFLAG(gad,flag) ((((gad)->GadgetType)&(flag))==(flag))
  287.  
  288. /*
  289.  * Aus RSysDosLists.c
  290.  */
  291. #define BPTR_TO_C(strtag, var)  ((struct strtag*)(BADDR( (ULONG) var)))
  292. #define C_TO_BPTR(var)     (((ULONG)var)>>2)
  293.  
  294. /* 
  295.  * Aus RSysInitData.c
  296.  */
  297. #define HWKEY           ((struct Remember**)&HWKey)
  298. #define ALLOCHW(size)   AllocRemember(HWKEY, (size), MEMF_CLEAR)
  299.  
  300. #define LOKEY           ((struct Remember**)&LOKey)
  301. #define ALLOCLO(size)   AllocRemember(LOKEY, (size), MEMF_CLEAR)
  302.  
  303. #define VMKEY           ((struct Remember**)&VMKey)
  304. #define ALLOCVM(size)   AllocRemember(VMKEY, (size), MEMF_CLEAR)
  305.  
  306. /* 
  307.  * Aus RSysMonitor.c
  308.  */
  309. #define LINESIZE        16L
  310. #define LINECOUNT       32L
  311. #define BLOCKSIZE       512L
  312. #define DISPLAYCOUNT    4
  313.  
  314. #define MONKEY             ((struct Remember**)&MonKey)
  315. #define AllocMonMem(size)  AllocRemember(MONKEY,(size),MEMF_CLEAR);
  316.  
  317. /* 
  318.  * Aus RSysInit.c
  319.  */
  320. #define GTMN_NewLookMenus    GT_TagBase+67/* ti_Data is boolean */
  321. #define NEWLEN 24
  322.  
  323.